#include<iostream>
#include<algorithm>
#include<cmath>
using namespace std;
const double EPSILON = 1e-6;
double num[105];
bool cmp(double x, double y) {
	double dx = fabs(x - round(x));
	double dy = fabs(y - round(y));
	if(fabs(dx - dy) < EPSILON) {
		return x < y;
	}
	return dx < dy;
}
int main() {
	int arr[100];
	int N;
	cin >> N;
	for(int i = 0; i < N; i++) {
		cin >> num[i];
	}
	sort(num, num+N, cmp);
	for(int i = 0; i < N; i++) {
		if(i != N-1) {
			printf("%.6f ", num[i]); 
		}else{
			printf("%.6f", num[i]);
		} 
	}
	return 0;
}
